home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / programming / oracle7 7.2 / NET / NETS22 / NETS22.VRF < prev    next >
Encoding:
Text File  |  1995-10-13  |  10.5 KB  |  254 lines

  1. /* Copyright (c) Oracle Corporation 1992.  All Rights Reserved */
  2. /*****************************************************************************
  3.   NAME
  4.     nets22.vrf - Windows 95 V3 installation verification script for SQL*Net.
  5.  
  6.   DESCRIPTION
  7.     This script checks dependencies and environment settings for installation
  8.     of the Windows 95 SQL*Net product.
  9.  
  10.   VERSION
  11.     2.2.0.0.0
  12.  
  13.   OWNER
  14.     Mason Ng
  15.  
  16.   MODIFIED    DD-MMM-YY Reason
  17.     trodgers  10-APR-92 Created.
  18.     zkhan     11-AUG-93 Modified for SQLNET and for using V3.0.9.3.2 or later
  19.             of the installer.
  20.     mng       05-JAN-94 Modified for NT.
  21.     eflores   04-APR-94 Modified for 2.1.2
  22.     dlau      07-AUG-95 Modified for SQLNET 2.2
  23.     LMurphy   07-SEP-95 Modified for Windows 95
  24. *****************************************************************************/
  25.  
  26. {
  27.  { doit = execute("%installer_home%\win95.vrf"); }
  28.   [
  29.     'UNBOUND_VARIABLE:
  30.       {
  31.     required_version = product_version(w95instver);
  32.     temp = explode(required_version,".");
  33.     required_version = implode(list(first(temp),first(rest(temp)),
  34.                     first(rest(rest(temp))),
  35.                     first(rest(rest(rest(temp))))),".");
  36.     signal('failure,instantiate(nls("instver_too_early1","The version of
  37. the Installer currently running is %%installer_version%%. The installation you
  38. have chosen requires version %%required_version%% or later. Please run version
  39. %%required_version%% or later in order to perform this installation.")));
  40.       }
  41.   ]
  42.  
  43.  if (doit)
  44.   {
  45.     vrf_ratchet = "2.2.2.0.0";
  46.  
  47.     net2_register = nls("net2_register","Registering %product_label%...");
  48.  
  49.     net2_install_script = nls("net2_install_script","Installing %product_label% Installation Scripts...");
  50.  
  51.     net2_install_message = nls("net2_install_message","Installing %product_label% Message Files...");
  52.  
  53.     net2_install_sample = nls("net2_install_sample","Installing %product_label% Sample Files...");
  54.  
  55.     net2_install_dll = nls("net2_install_dll","Installing %product_label% DLL's...");
  56.  
  57.     net2_install_exe = nls("net2_install_exe","Installing %product_label% Executables...");
  58.  
  59.     nets22_expl = nls("nets22_expl", "A %%product_label%% DLL (%%dll_name%%.DLL) is being used on this machine. Please stop all Oracle applications that are using %%product_label%% before installing %%product_label%%.
  60.  
  61. Silent mode installation of %%product_label%% terminated.");
  62.     nets22_inst = instantiate(nls("nets22_inst", "A %%product_label%% DLL (%%dll_name%%.DLL) is being used on this machine. Please stop all Oracle applications that are using %%product_label%% before installing %%product_label%%.
  63.  
  64. Choose OK after you have closed all Oracle applications and want to resume the installation of %%product_label%%.
  65.  
  66. Choose CANCEL to terminate the installation of %%product_label%%.
  67.     "));
  68.     nets22_inst_term = instantiate(nls("nets22_inst_term", "%%product_label%% installation terminated."));
  69.     nets22_inst_content = instantiate(nls("nets22_inst_content", "%%product_label%% DLL Used"));
  70.     nets22_inst_help = instantiate(nls("nets22_inst_help", "The Oracle Installer has detected that a %%product_label%% DLL (%%dll_name%%.DLL) is being used on this machine.  Please stop all Oracle applications that are using %%product_label%% before installing %%product_label%%.
  71.  
  72. Choose OK after you have closed all Oracle applications and want to resume the installation of %%product_label%%.
  73.  
  74. Choose CANCEL to terminate the installation of %%product_label%%.
  75.     "));
  76.     nets22_exe_expl = nls("nets22_exe_expl", "%%product_label%% (TNSLSNR.EXE) is currently running on this machine. Please stop all Oracle Listeners using Stop Database before installing %%product_label%%.
  77.  
  78. Silent mode installation of %%product_label%% terminated.");
  79.     nets22_exe_inst = instantiate(nls("nets22_exe_inst", "%%product_label%% (TNSLSNR.EXE) is currently running on this machine. Please stop all Oracle Listeners using Stop Database before installing %%product_label%%.
  80.  
  81. Choose OK after you have closed all Oracle applications and want to resume the installation of %%product_label%%.
  82.  
  83. Choose CANCEL to terminate the installation of %%product_label%%.
  84.     "));
  85.     nets22_exe_inst_term = instantiate(nls("nets22_exe_inst_term", "%%product_label%% installation terminated."));
  86.     nets22_exe_inst_content = instantiate(nls("nets22_exe_inst_content", "%%product_label%% Running"));
  87.     nets22_exe_inst_help = instantiate(nls("nets22_exe_inst_help", "The Oracle Installer has detected that %%product_label%% (TNSLSNR.EXE) is currently running on this machine.  Please stop all Oracle Listeners using Stop Database before installing %%product_label%%.
  88.  
  89. Choose OK after you have closed all Oracle applications and want to resume the installation of %%product_label%%.
  90.  
  91. Choose CANCEL to terminate the installation of %%product_label%%.
  92.     "));
  93.  
  94.     spx_tcp_must_be_installed = nls("spx_tcp_must_be_installed","You must select either the TCP/IP or SPX network protocol which %product_label% support. %product_label% not installed.");
  95.     spx_tcp_must_be_installed_label = nls("spx_tcp_must_be_installed_label","TCP/IP or SPX Not Installed");
  96.     spx_tcp_must_be_installed_help = nls("spx_tcp_must_be_installed_help","You must select either the TCP/IP or SPX network protocol which %product_label% support. %product_label% not installed.
  97.  
  98. OK continues with the installation of other products.
  99.  
  100. CANCEL terminates the installation of %product_label%.
  101.     ");
  102.  
  103.  
  104.    if (install_type == install_type_custom)
  105.         custom_install = TRUE;
  106.    else
  107.         custom_install = FALSE;
  108.    }
  109.    [ 'UNBOUND_VARIABLE: custom_install = TRUE; ]
  110.  
  111.     /* check to see if all listeners are shutdown */
  112.  
  113.  
  114.    done = FALSE;
  115.    while(not(done))
  116.    { move_file("%ORACLE_HOME%\bin\TNSLSNR.exe", "%ORACLE_HOME%\bin\TNSLSNR.exe"); done = TRUE; }
  117.       [ 'PERMISSION_DENIED, 'INVALID_FILE_NAME, 'OS_ERROR, 'WRITE_ERROR:
  118.        {
  119.          if (silent_mode)
  120.            signal('FAILURE, instantiate(nets22_exe_expl));
  121.          else
  122.            information_dialog(instantiate(nets22_exe_inst), nets22_exe_inst_content, instantiate(nets22_exe_inst_help));
  123.        }
  124.         'FILE_NOT_FOUND:
  125.          done = TRUE;
  126.       ]                       
  127.  
  128.    done = FALSE;
  129.    while(not(done))
  130.    { move_file("%ORACLE_HOME%\bin\ntpnt.dll", "%ORACLE_HOME%\bin\ntpnt.dll"); done = TRUE;}
  131.     [ 'PERMISSION_DENIED, 'INVALID_FILE_NAME, 'OS_ERROR, 'WRITE_ERROR:
  132.       {
  133.         dll_name = "NTPNT";
  134.         if (silent_mode)
  135.           signal('FAILURE, instantiate(nets22_expl));
  136.         else
  137.           information_dialog(instantiate(nets22_inst), nets22_inst_content, instantiate(nets22_inst_help));
  138.       }
  139.       'FILE_NOT_FOUND:
  140.         done = TRUE;
  141.     ]                       
  142.   
  143.    done = FALSE;
  144.    while(not(done))
  145.    { move_file("%ORACLE_HOME%\bin\ntusnt.dll", "%ORACLE_HOME%\bin\ntusnt.dll"); done = TRUE;}
  146.     [ 'PERMISSION_DENIED, 'INVALID_FILE_NAME, 'OS_ERROR, 'WRITE_ERROR:
  147.       {
  148.         dll_name = "NTUSNT";
  149.         if (silent_mode)
  150.           signal('FAILURE, instantiate(nets22_expl));
  151.         else
  152.           information_dialog(instantiate(nets22_inst), nets22_inst_content, instantiate(nets22_inst_help));
  153.       }
  154.       'FILE_NOT_FOUND:
  155.         done = TRUE;
  156.     ]                       
  157.  
  158.    copy_tcp_lsnr = FALSE;
  159.    copy_spx_lsnr = FALSE;
  160.  
  161.    increment = 0;
  162.    while (increment < 100)
  163.    {
  164.      if (increment > 9)
  165.        increment_string = "%increment%";
  166.      else
  167.        increment_string = "0%increment%";
  168.      temp_string = win32_get_value("HKEY_LOCAL_MACHINE",
  169.                                    "System\CurrentControlSet\Services\Class\NetTrans\00%increment_string%",
  170.                                    "DeviceVxDs");
  171.      temp_list = explode(temp_string,",", 'STRINGSONLY);
  172.      if (member(temp_list, "vtcp.386"))
  173.        copy_tcp_lsnr = TRUE;
  174.      else if (member(temp_list, "nwlink.vxd"))
  175.        copy_spx_lsnr = TRUE;
  176.      increment = increment + 1;
  177.    }
  178.    ['INVALID_KEY, 'FILE_NOT_FOUND, 'OS_ERROR: increment = increment + 1;]
  179. /*
  180.    if(win32_key_exists("HKEY_LOCAL_MACHINE",
  181.                        "System\CurrentControlSet\Services\VxD\MSTCP"))
  182.       copy_tcp_lsnr = TRUE;
  183.  
  184.    if(win32_key_exists("HKEY_LOCAL_MACHINE",
  185.                        "System\CurrentControlSet\Services\VxD\NWLink"))
  186.       copy_spx_lsnr = TRUE;
  187. */
  188.    total = 0;
  189.    if ((copy_tcp_lsnr) || (copy_spx_lsnr))
  190.    {
  191.      total = total + verify(w95netclt22);
  192.  
  193.      if (copy_tcp_lsnr && copy_spx_lsnr)
  194.      {
  195.        if (registered("w95tcp22") || member(products_for_installation, w95tcp22))
  196.             copy_spx_lsnr = FALSE;
  197.          else
  198.             copy_tcp_lsnr = FALSE;
  199.      }
  200.  
  201.      if ((not(member(products_for_installation, w95tcp22) ||
  202.              member(products_for_installation, w95spx22))) &&
  203.           not(registered("w95tcp22")) &&  not(registered("w95spx22"))) 
  204.  
  205.      {
  206.        if (member(selected_products, w95netsrv22) && empty(rest(selected_products)))
  207.          signal('CANCEL,spx_tcp_must_be_installed);
  208.        else
  209.        {
  210.          information_dialog(spx_tcp_must_be_installed,spx_tcp_must_be_installed_label,spx_tcp_must_be_installed_help);
  211.          doit = FALSE;
  212.          return(total);
  213.        }
  214.      }
  215.  
  216.      if (copy_tcp_lsnr)
  217.        total = total + sum(lsnr,"tcp");
  218.      else
  219.        total = total + sum(lsnr,"spx");
  220.      total = total + sum(sample, dll, exe, deinstl);
  221.      return(total + verify(w95rsf72));
  222.    }
  223.    else
  224.    {
  225.      information_dialog(nls("no_protocols","The Installer did not detect TCP/IP or SPX protocols on your machine. You need to install either TCP/IP or SPX before installing %product_label%."),
  226.                         nls("no_protocols_content", "No Protocol Detected"),
  227.                         nls("no_protocols_hlp","The Oracle Installer did not detect TCP/IP or SPX protocols on your machine.
  228.  
  229. Please install either TCP/IP or SPX before installing %product_label%.
  230.  
  231. The TCP/IP network protocol enables data transfer on Local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
  232.  
  233. The SPX network protocol enables data transfer in a Novell NetWare environment.
  234.  
  235. If you are not familiar with network transport protocols, please contact your network administrator."),
  236.                         'NO_CANCEL);
  237.      if (custom_install && member(selected_products, w95netsrv22) && empty(rest(selected_products)))
  238.      {        
  239.         signal('CANCEL, nets22_inst_term);
  240.      }
  241.      else
  242.      {
  243.         doit = FALSE;
  244.         return(0);
  245.      }
  246.    }
  247.   }
  248.  else
  249.    {
  250.     refresh_map_file = FALSE;
  251.     return(0);
  252.    }
  253. }
  254.